package com.meal.entity.model.wx;

import lombok.Data;

import java.util.Map;

/**
 * @program: yzh->BaseResponse
 * @description: BaseResponse
 * @author: yangzhanghui
 * @create: 2019-09-10 11:19
 **/
@Data
public class BaseResponse {

    // 接收方帐号（收到的OpenID）
    private String ToUserName;
    // 开发者微信号
    private String FromUserName;
    // 消息创建时间 （整型）
    private long CreateTime;
    // 消息类型
    private String MsgType;

    public BaseResponse(Map<String, String> requMap){
        this.ToUserName = requMap.get("FromUserName");
        this.FromUserName = requMap.get("ToUserName");
        this.CreateTime = System.currentTimeMillis() / 1000;
    }
}
